<template>
  <div class="alarm">
    <el-form :inline="true" :model="site" class="demo-form-inline">
      <el-form-item class="handItem" label="告警发送策略列表">
        <el-input class="handInput" v-model="site.id" ></el-input><i class="el-icon-search  search"></i>
      </el-form-item>
      <el-form-item class="handItem" style="float: right">
        <el-button class="indieWidth" type="primary" @click="onSubmit">
          <router-link :to="{path:'./addSite'}"><img :src="add" class="imgBtn"/> 新增实时策略</router-link>
        </el-button>
        <el-button class="indieWidth" type="primary" @click="onSubmit">
          <router-link :to="{path:'./addSite'}"><img :src="add" class="imgBtn"/>新增定时策略</router-link>
        </el-button>
        <el-button type="primary" class="clear" @click="open2"><img :src="Delete" class="imgBtn"/>批量删除</el-button>
        <el-button class="indieWidth" type="primary" @click="onSubmit">
          <router-link :to="{path:'./addSite'}"><img :src="add" class="start imgBtn "/>批量启用</router-link>
        </el-button>
        <el-button class="indieWidth Batchdisable" type="primary" @click="onSubmit">
          <router-link :to="{path:'./addSite'}"><img :src="add" class="disable imgBtn"/>批量禁用</router-link>
        </el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import add from '@/assets/components/add.png'
  import Delete from '@/assets/components/delete.png'
  import start from '@/assets/components/start.png'
  import disable from '@/assets/components/disable.png'
  export default {
    props: ['deleteids'],
    data() {
      return {
        add,
        Delete,
        start,
        disable,
        site: {
          id: '',
          name: '',
          number: ''
        }
      }
    },
    methods: {
      onSubmit() {
      },
      // 删除按钮事件
      open2() {
        console.log(this.deleteids)
        this.$confirm('确认是否删除组织？', '提示', {
          cancelButtonClass: 'userCancel',
          confirmButtonClass: 'userConfirm',
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          console.log(111)
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      }
    }
  }
</script>

<style scoped>
  .alarm{
    width: 100%;
    height: 50px;
    background-color: #EFF3F6;
    padding-top: 5px;
    padding-left: 20px;
  }
  .imgBtn{
    vertical-align: middle;
  }
  /deep/ .search{
    position: absolute;
    margin-top: 13px;
    margin-left: -25px;
    cursor: pointer;
    color: #25B6C7;
    font-weight: bold;
  }
  .Batchdisable{
    background-color: #D05133 !important;
    border: 1px solid  #D05133 !important;
  }
  /deep/ label {
    font-weight: normal;
    color: #69727E;
  }
  /deep/ .handItem {
    margin-bottom: 5px!important;
  }
  /deep/ .indieWidth {
    padding: 6px 8px;
  }
  /deep/ .reset {
    padding: 6px 16px;
    background-color: #333B3D;
    border-color: #333B3D ;
    color: #fff;
  }
  /deep/ .clear{
    padding: 6px 16px;
    background-color: #333B3D;
    border-color: #333B3D ;
    color: #fff;
  }
  /deep/ .el-button + .el-button {
    margin-left: 5px;
  }
  /deep/ .el-button--primary {
    height: 30px;
    font-size: 14px;
    padding: 6px 16px;
    background: #25B6C7;
    border-color: #25B6C7;
  }
  /deep/ .el-input__inner {
    height: 30px;
    line-height: 30px;
    width: 360px;
  }
  /deep/ .clear{
    padding: 6px 16px;
    background-color: #333B3D;
    border-color: #333B3D ;
    color: #fff;
    line-height: 0px;
  }
  /deep/ .export {
    background: #fff;
    border: 1px solid #25B6C7;
    color: #25B6C7;
  }
  /deep/ .el-icon-delete {
    height: 16px;
    line-height: 12px;
  }
  /deep/ .el-icon-delete:before {
    font-size: 16px;
    color: #fff;
  }
  /deep/ .el-message-box{
    width: 540px;
  }
  /deep/ .el-message-box__header{
    background-color: #E3E6EE;
    padding: 10px 15px;
  }
  /deep/ .el-message-box__title{
    font-size: 18px;
    font-weight: Bold;
    color: #323842;
  }
  /deep/ .el-message-box__status{
    right: 247px;
    top: 65px;
    font-size: 48px !important;
  }
  /deep/ .el-message-box__status.el-icon-warning{
    color: #E53D41;
  }
  /deep/ .el-message-box__content{
    height: 182px;
  }
  /deep/ .el-message-box__message p {
    margin: 0;
    font-size: 18px;
    color: #323842;
    padding-top: 96px;
    text-indent: 0px;
    text-align: center;
  }
  /deep/ .el-message-box__headerbtn{
    top: 9px;
    font-size: 18px;
  }
  /deep/ .el-message-box__btns{
    padding: 10px 15px 7px ;
    border-top: 1px solid #e8eaf1;
  }
</style>
